// 咪婴伴侣logo https://ossresource.miyingbl.com/uploads/20230918/test/logo.png
.h-flex {
  display: flex;
}

.h-flex-column {
  display: flex;
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-column-row-start {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flex-column-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.flex-column-around {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.flex-column-between {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.flex-column-start {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flex-column-end {
  display: flex;
  align-items: flex-end;
}

.flex-row-wrap {
  display: flex;
  flex-wrap: wrap;
}

.flex-row-start {
  display: flex;
  align-items: center;
}

.flex-row-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.flex-row-center {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.flex-row-between {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.bg-co-blue {
  background-color: #FFB300 !important;
}
.bg-co-white {
  background-color: #ffffff;
}
.bg-co-f6 {
  background-color: #f6f6f6;
}
.bg-co-cream {
  background-color: #fff1d9;
}
.bg-co-ee {
  background-color: #eee;
}

.co-blue {
  color: #FFB300;
}
.co-green {
  color: #41ccd0;
}
.co-99 {
  color: #999999;
}
.co-33 {
  color: #333333;
}
.co-red {
  color: #e50000;
}
.co-9c {
  color: #9c9c9c;
}
.co-b2 {
  color: #b2b2b2;
}
.co-white {
  color: #ffffff !important;
}
.co-black {
  color: #000000;
}
.co-brown {
  color: #784a14;
}

.w-170 {
  width: 170rpx;
}
.w-200 {
  width: 200rpx;
}
.w-702 {
  width: 702rpx;
}
.w-750 {
  width: 750rpx;
}
.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}
.h-150 {
  height: 150rpx;
}
.h-60 {
  height: 60rpx;
}
.h-68 {
  height: 68rpx;
}

.m-h-100 {
  min-height: 100vh;
}

.mar-0-auto {
  margin: 0 auto;
}
.mar-t-10 {
  margin-top: 10rpx;
}
.mar-t-20 {
  margin-top: 20rpx;
}
.mar-t-30 {
  margin-top: 30rpx;
}
.mar-t-40 {
  margin-top: 40rpx;
}
.mar-t-50 {
  margin-top: 50rpx;
}
.mar-l-16 {
  margin-left: 16rpx;
}
.mar-l-24 {
  margin-left: 24rpx;
}
.mar-r-6 {
  margin-right: 6rpx;
}
.mar-r-10 {
  margin-right: 10rpx;
}
.mar-r-16 {
  margin-right: 16rpx;
}
.mar-r-30 {
  margin-right: 30rpx;
}
.mar-r-50 {
  margin-right: 50rpx;
}
.mar-r-80 {
  margin-right: 80rpx;
}
.mar-b-20 {
  margin-bottom: 20rpx;
}

.p-20 {
  padding: 20rpx;
}
.p-30 {
  padding: 30rpx;
}
.p-t-15 {
  padding-top: 15rpx;
}
.p-t-20 {
  padding-top: 20rpx;
}
.p-t-30 {
  padding-top: 30rpx;
}
.p-b-12 {
  padding-bottom: 12rpx;
}
.p-b-15 {
  padding-bottom: 15rpx;
}
.p-b-20 {
  padding-bottom: 20rpx;
}
.p-b-30 {
  padding-bottom: 30rpx;
}
.p-b-50 {
  padding-bottom: 50rpx;
}
.p-l-3 {
  padding-left: 3rpx;
}
.p-l-12 {
  padding-left: 12rpx;
}
.p-l-20 {
  padding-left: 20rpx;
}
.p-l-30 {
  padding-left: 30rpx;
}
.p-r-20 {
  padding-right: 20rpx;
}
.p-r-30 {
  padding-right: 30rpx;
}
.p-l-24 {
  padding-left: 24rpx;
}
.p-l-40 {
  padding-left: 40rpx;
}
.p-r-24 {
  padding-right: 24rpx;
}

.bor-radius-16 {
  border-radius: 16rpx;
}
.bor-radius-10 {
  border-radius: 10rpx;
}
.bor-radius-50 {
  border-radius: 50%;
}

.f-s-20 {
  font-size: 20rpx;
}
.f-s-24 {
  font-size: 24rpx;
}
.f-s-26 {
  font-size: 26rpx;
}
.f-s-28 {
  font-size: 28rpx !important;
}
.f-s-30 {
  font-size: 30rpx;
}
.f-s-32 {
  font-size: 32rpx;
}
.f-s-34 {
  font-size: 34rpx;
}
.f-s-40 {
  font-size: 40rpx;
}

.f-w-500 {
  font-weight: 500;
}
.f-w-600 {
  font-weight: 600;
}
.f-w-800 {
  font-weight: 800;
}

.del-line {
  text-decoration: line-through;
}

.l-h-1 {
  line-height: 1;
}

.text-center {
  text-align: center;
}

.s-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 702rpx;
  height: 75rpx;
  background: #0074fc;
  border-radius: 38rpx 38rpx 38rpx 38rpx;
  opacity: 1;
  font-size: 32rpx;
  font-weight: 500;
  color: #ffffff;
  margin: 0 auto;
}

.box-shadow {
  box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(181, 181, 181, 0.16);
}

/*
 单行文字溢出 显示省略号
*/
.text-overflow-ep {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/*
   两行文字溢出 显示省略号
  */
.text-overflow-ep-2 {
  line-height: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/*
   三行文字溢出 显示省略号
  */
.text-overflow-ep-3 {
  line-height: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}

button,
uni-button:after {
  border: none !important;
  padding: 0 !important;
}

.sort-2n-1 {
  & :nth-child(2n + 1) {
    margin-right: 20rpx;
  }
}

.u-relative,
.u-rela {
  position: relative;
}

.u-absolute,
.u-abso {
  position: absolute;
}

// nvue不能用标签命名样式，不能放在微信组件中，否则微信开发工具会报警告，无法使用标签名当做选择器
/* #ifndef APP-NVUE */
image {
  display: inline-block;
}

// 在weex，也即nvue中，所有元素默认为border-box
view,
text {
  box-sizing: border-box;
}
/* #endif */

.u-font-xs {
  font-size: 22rpx;
}

.u-font-sm {
  font-size: 26rpx;
}

.u-font-md {
  font-size: 28rpx;
}

.u-font-lg {
  font-size: 30rpx;
}

.u-font-xl {
  font-size: 34rpx;
}

.u-flex-wrap {
  flex-wrap: wrap;
}

.u-flex-nowrap {
  flex-wrap: nowrap;
}

.u-col-center {
  align-items: center;
}

.u-col-top {
  align-items: flex-start;
}

.u-col-bottom {
  align-items: flex-end;
}

.u-row-center {
  justify-content: center;
}

.u-row-left {
  justify-content: flex-start;
}

.u-row-right {
  justify-content: flex-end;
}

.u-row-between {
  justify-content: space-between;
}

.u-row-around {
  justify-content: space-around;
}

.u-text-left {
  text-align: left;
}

.u-text-center {
  text-align: center;
}

.u-text-right {
  text-align: right;
}

.u-flex-col {
  /* #ifndef APP-NVUE */
  display: flex;
  /* #endif */
  flex-direction: column;
}
// 定义字体加粗
@for $i from 2 to 9 {
  .u-bold-#{$i} {
    font-weight: $i;
  }
}

// 定义flex等分
@for $i from 0 through 12 {
  .u-flex-#{$i} {
    flex: $i;
  }
}

// 定义字体(px)单位，小于20都为px单位字体
@for $i from 9 to 20 {
  .u-font-#{$i} {
    font-size: $i + px;
  }
}

// 定义字体(rpx)单位，大于或等于20的都为rpx单位字体

// 定义内外边距，历遍1-80
@for $i from 0 through 80 {
  // 只要双数和能被5除尽的数
  @if $i % 2 == 0 or $i % 5 == 0 {
    // 得出：u-margin-30或者u-m-30
    .u-margin-#{$i},
    .u-m-#{$i} {
      margin: $i + rpx !important;
    }

    // 得出：u-padding-30或者u-p-30
    .u-padding-#{$i},
    .u-p-#{$i} {
      padding: $i + rpx !important;
    }

    @each $short, $long in l left, t top, r right, b bottom {
      // 缩写版，结果如： u-m-l-30
      // 定义外边距
      .u-m-#{$short}-#{$i} {
        margin-#{$long}: $i + rpx !important;
      }

      // 定义内边距
      .u-p-#{$short}-#{$i} {
        padding-#{$long}: $i + rpx !important;
      }

      // 完整版，结果如：u-margin-left-30
      // 定义外边距
      .u-margin-#{$long}-#{$i} {
        margin-#{$long}: $i + rpx !important;
      }

      // 定义内边距
      .u-padding-#{$long}-#{$i} {
        padding-#{$long}: $i + rpx !important;
      }
    }
  }
}

// 重置nvue的默认关于flex的样式
.u-reset-nvue {
  flex-direction: row;
  align-items: center;
}
.u-flex {
  /* #ifndef APP-NVUE */
  display: flex;
  /* #endif */
  flex-direction: row;
  align-items: center;
}
